#pragma once

static GLfloat _vertices[] = {
	-1.0f,  1.0f,  1.0f, // 0 top-left near
	 1.0f,  1.0f,  1.0f, // 1 top-right near
	-1.0f, -1.0f,  1.0f, // 2 bottom-left near
	 1.0f, -1.0f,  1.0f, // 3 bottom-right near
	-1.0f,  1.0f, -1.0f, // 4 top-left far
	 1.0f,  1.0f, -1.0f, // 5 top-right far
	-1.0f, -1.0f, -1.0f, // 6 bottom-left far
	 1.0f, -1.0f, -1.0f, // 7 bottom-right far 
};

static GLubyte _indices[] = {
	// front
	1, 3, 0,
	0, 3, 2,
	// back
	4, 6, 5,
	5, 6, 7,
	// left
	0, 2, 4,
	4, 2, 6,
	// right
	5, 7, 1,
	1, 7, 3,
	// top
	5, 1, 4,
	4, 1, 0,
	// bottom
	6, 2, 7,
	7, 2, 3,
};

class skybox {
public:
	void 
	binddata() {
		glEnableVertexAttribArray(0);
		glVertexAttribPointer(0, 3, GL_FLOAT, GL_FALSE, 0, _vertices);
	}

	void
	draw() {
		glDrawElements(GL_TRIANGLES, 36, GL_UNSIGNED_BYTE, _indices);
	}
};
